<?php
class View_Administration_Project_Edit extends View_Administration_Project
{
	public function buildContent( $projectId )
	{
		$request	= CMF_Krypton_Core_Registry::getStatic( 'request' );
		$session	= CMF_Krypton_Core_Registry::getStatic( 'session' );
		$words		= $this->words['project']['editProject'];
		$data	= Logic_Project::getProjectData( $projectId );

		//  --  UI COMPONENTS  --  //
		$ui	= array(
			'form'			=> $this->buildForm(
				'administration/project',
				'editProject',
				'project',
				'editProject',
				$data
			),
			'form.tag'		=> $this->html->Form(
				'editProject',
				self::getUrl( array( 'projectId' => $projectId ) )
			),
			'buttonCancel'	=> $this->html->LinkButton(
				self::getUrl(),
				$words['buttonCancel'],
				'but cancel'
			),
			'buttonEdit'	=> $this->html->Button(
				'editProject',
				$words['buttonEdit'],
				'but edit'
			),
			'buttonRemove'	=> $this->html->LinkButton(
				self::getUrl( array( 'removeProject' => $projectId ) ),
				$words['buttonRemove'],
				'but remove',
				$words['buttonRemoveConfirm']
			),
			'caption'	=> $this->html->TableCaption( $words['caption'], 'edit' ),
			'colgroup'	=> $this->html->ColumnGroup( $words['colgroup'] ),
		);

		return $this->loadTemplate( 'administration.project.edit', $ui );
	}
}
?>